package com.livegoods.controller;


import com.livegoods.commons.pojo.LivegoodsResult;
import com.livegoods.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class UserController {


    @Autowired
    private UserService userService;

    @RequestMapping("/user/sendyzm")
    public LivegoodsResult sendVerifyCode(String phone){
        return  userService.sendVerifyCode(phone);
    }

    @RequestMapping("/user/login")
    private LivegoodsResult login(String username, String password, HttpServletRequest request){

        return userService.login(username,password,request);

    }

}
